#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int i = 0;
	int term = 1;
	int n = 0;
	scanf("%d", &n);
	for (i = n; i >= 1; i--)
	{
		term *= i;
	}
	printf("%d", term);
	return 0;
}